<body>
    <h1 id="foo"></h1>
    <script>
        document.getElementById('foo').textContent = 'bar';
    </script>
</body>
